3.4 \(\int \frac {\csc ^2(x)}{a+a \csc (x)} \, dx\)

Optimal. Leaf size=20 \[ \frac {\cot (x)}{a \csc (x)+a}-\frac {\tanh ^{-1}(\cos (x))}{a} \]

[Out]

-arctanh(cos(x))/a+cot(x)/(a+a*csc(x))

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3789, 3770, 3794} \[ \frac {\cot (x)}{a \csc (x)+a}-\frac {\tanh ^{-1}(\cos (x))}{a} \]

Antiderivative was successfully verified.

[In]

Int[Csc[x]^2/(a + a*Csc[x]),x]

[Out]

-(ArcTanh[Cos[x]]/a) + Cot[x]/(a + a*Csc[x])

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3789

Int[csc[(e_.) + (f_.)*(x_)]^2/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[Csc[e + f*x],
 x], x] - Dist[a/b, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x]

Rule 3794

Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> -Simp[Cot[e + f*x]/(f*(b + a*
Csc[e + f*x])), x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {\csc ^2(x)}{a+a \csc (x)} \, dx &=\frac {\int \csc (x) \, dx}{a}-\int \frac {\csc (x)}{a+a \csc (x)} \, dx\\ &=-\frac {\tanh ^{-1}(\cos (x))}{a}+\frac {\cot (x)}{a+a \csc (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.05, size = 44, normalized size = 2.20 \[ \frac {\log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )\right )-\frac {2 \sin \left (\frac {x}{2}\right )}{\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )}}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[x]^2/(a + a*Csc[x]),x]

[Out]

(-Log[Cos[x/2]] + Log[Sin[x/2]] - (2*Sin[x/2])/(Cos[x/2] + Sin[x/2]))/a

________________________________________________________________________________________

fricas [B]  time = 0.49, size = 53, normalized size = 2.65 \[ -\frac {{\left (\cos \relax (x) + \sin \relax (x) + 1\right )} \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - {\left (\cos \relax (x) + \sin \relax (x) + 1\right )} \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - 2 \, \cos \relax (x) + 2 \, \sin \relax (x) - 2}{2 \, {\left (a \cos \relax (x) + a \sin \relax (x) + a\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-1/2*((cos(x) + sin(x) + 1)*log(1/2*cos(x) + 1/2) - (cos(x) + sin(x) + 1)*log(-1/2*cos(x) + 1/2) - 2*cos(x) +
2*sin(x) - 2)/(a*cos(x) + a*sin(x) + a)

________________________________________________________________________________________

giac [A]  time = 0.60, size = 24, normalized size = 1.20 \[ \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{a} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+a*csc(x)),x, algorithm="giac")

[Out]

log(abs(tan(1/2*x)))/a + 2/(a*(tan(1/2*x) + 1))

________________________________________________________________________________________

maple [A]  time = 0.25, size = 24, normalized size = 1.20 \[ \frac {2}{a \left (\tan \left (\frac {x}{2}\right )+1\right )}+\frac {\ln \left (\tan \left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(x)^2/(a+a*csc(x)),x)

[Out]

2/a/(tan(1/2*x)+1)+1/a*ln(tan(1/2*x))

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 31, normalized size = 1.55 \[ \frac {\log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right )}{a} + \frac {2}{a + \frac {a \sin \relax (x)}{\cos \relax (x) + 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)^2/(a+a*csc(x)),x, algorithm="maxima")

[Out]

log(sin(x)/(cos(x) + 1))/a + 2/(a + a*sin(x)/(cos(x) + 1))

________________________________________________________________________________________

mupad [B]  time = 0.18, size = 23, normalized size = 1.15 \[ \frac {2}{a\,\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}+\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(x)^2*(a + a/sin(x))),x)

[Out]

2/(a*(tan(x/2) + 1)) + log(tan(x/2))/a

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\csc ^{2}{\relax (x )}}{\csc {\relax (x )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(x)**2/(a+a*csc(x)),x)

[Out]

Integral(csc(x)**2/(csc(x) + 1), x)/a

________________________________________________________________________________________